/**
 * @filename:I118ServiceImpl 2023-4-16
 * @project Wonder Java前后台分离框架  1.1.0
 * Copyright(c) 2022 Wonder Co. Ltd. 
 * All right reserved. 
 */
package com.wonder.admin.service.impl;

import com.wonder.admin.domain.I118;
import com.wonder.admin.mapper.I118Dao;
import com.wonder.admin.service.I118Service;
import com.wonder.admin.request.I118Request;
import com.wonder.common.utils.StringUtils;
import com.wonder.common.utils.MessageUtils;
import com.wonder.common.common.AjaxResult;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**   
 * @Description:TODO(语言消息服务实现)
 *
 * @version: 1.1.0
 * @author: Wonder
 * 
 */
@Service
public class I118ServiceImpl  extends ServiceImpl<I118Dao, I118> implements I118Service  {

    /**
     * 验证语言消息信息
     * 
     * @param i118
     * @param type
     * @return String
     */
    @Override
    public String validate(I118 i118,String type){
    
    
       return "";
    }
    
    
    /**
	 * Description:语言消息分页返回
	 * @param request //检索条件
	 * @param page //分页参数
	 * @return IPage<I118>   //分页记录
	 */
	@Override 
	public IPage<I118> selectList(I118Request request, Page<I118> page){
	    LambdaQueryWrapper<I118> lambdaQueryWrapper = new LambdaQueryWrapper<>();
	    
	    if (null != request.getId()) {
	       lambdaQueryWrapper.eq(I118::getId, request.getId());
	      }               
             
        if (StringUtils.hasText(request.getMessage_id())) {
			    lambdaQueryWrapper.like(I118::getMessage_id, request.getMessage_id()); 
		    } 
             
        if (StringUtils.hasText(request.getName())) {
			    lambdaQueryWrapper.like(I118::getName, request.getName()); 
		    } 
             
        
		lambdaQueryWrapper.orderByDesc(I118::getId);	
		Page<I118> selectPage = this.baseMapper.selectPage(page, lambdaQueryWrapper);
		return selectPage;
    }
        
    
	
}